<!--
 * @Author: Meow
 * @Date: 2019-10-10 20:22:47
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2019-10-19 17:04:52
 * @Description: 标签管理
 -->
<template>
  <div class="homeLogic">
    <Table :tableData="table" />
  </div>
</template>

<script>
import Table from "./components/Table";
export default {
  name: "SystemLog",
  components: {
    Table
    // homeView
  },
  props: {
    // msg: String //  [name: typeof]
  },
  filters: {},
  computed: {},
  watch: {},
  data () {
    return {
      options: [],
      value: [],
      list: [],
      loading: false,
      states: [
        "Alabama",
        "Alaska",
        "Arizona",
        "Arkansas",
        "California",
        "Colorado",
        "Connecticut",
        "Delaware",
        "Florida",
        "Georgia",
        "Hawaii",
        "Idaho",
        "Illinois",
        "Indiana",
        "Iowa",
        "Kansas",
        "Kentucky",
        "Louisiana",
        "Maine",
        "Maryland",
        "Massachusetts",
        "Michigan",
        "Minnesota",
        "Mississippi",
        "Missouri",
        "Montana",
        "Nebraska",
        "Nevada",
        "New Hampshire",
        "New Jersey",
        "New Mexico",
        "New York",
        "North Carolina",
        "North Dakota",
        "Ohio",
        "Oklahoma",
        "Oregon",
        "Pennsylvania",
        "Rhode Island",
        "South Carolina",
        "South Dakota",
        "Tennessee",
        "Texas",
        "Utah",
        "Vermont",
        "Virginia",
        "Washington",
        "West Virginia",
        "Wisconsin",
        "Wyoming"
      ],
      Versiontime: "2019-09-17"
    };
  },
  created () { },
  mounted () {
    // this.list = this.states.map(item => {
    //   return { value: item, label: item };
    // });
  },
  methods: {
    //  搜索框输入
    remoteMethod (query) {
      console.log(query);
      if (query !== "") {
        this.loading = true;
        setTimeout(() => {
          this.loading = false;
          this.options = this.list.filter(item => {
            return item.label.toLowerCase().indexOf(query.toLowerCase()) > -1;
          });
        }, 200);
      } else {
        this.options = [];
      }
    },
    //  搜索框选中
    selectValue (value) {
      console.log(value);
      this.value = value;
    }
  },
  destroyed () { }
};
</script>

<style scoped lang="less">
.homeLogic {
  width: 100%;
  height: 100%;
}
</style>
